package com.yuanyefu.helloworld;

import org.springframework.beans.factory.InitializingBean;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 339814 on 2017/9/15.
 */
public class ExampleBean  implements InitializingBean{
    private List list;
    private int size=100;
    private String version;

    public void setSize(int size) {
        this.size = size;
    }

    public List getList() {
        return list;
    }

    public int getSize() {
        return size;
    }

    public void setVersion(String version) {
        this.version = version;
    }
 /*   public void init(){
        list=new ArrayList(size);
        list.add(version);
    }
*/
    public void afterPropertiesSet() throws Exception {
        list=new ArrayList(size);
        list.add(version);
    }
}
